package com.qk.management.mapper;

import com.qk.domain.user.UserDo;
import com.qk.dto.user.UserDTO;
import com.qk.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    List<UserDo> selectByPage(UserDTO dto);

    void insert(User user);

    void deleteBatch(List<Integer> ids);

    @Select("select * from user where id = #{id}")
    User selectById(Integer id);

    void updateById(User user);

    @Select("select image from user where image is not null")
    List<String> selectValidFileUrls();

    @Select("select * from user where username like concat('%',#{username},'%')")
    User selectByUsername(String username);

    List<User> listByRoleLabel(String roleLabel);
}
